package com.itrustsolution.rms.entities;
// Generated 25 Mei 11 22:19:57 by Hibernate Tools 3.2.1.GA


import java.util.Date;
import java.util.HashSet;
import java.util.Set;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * TckTicket generated by hbm2java
 */
@Entity
@Table(name="tck_ticket"
    ,catalog="rms"
)
public class TckTicket  implements java.io.Serializable {


     private Integer ticketId;
     private RmsClient rmsClient;
     private RskRiskProbability rskRiskProbability;
     private RmsProduct rmsProduct;
     private TckTicketSla tckTicketSla;
     private TckTicketStatus tckTicketStatus;
     private RskRiskSeverity rskRiskSeverity;
     private TckTicketType tckTicketType;
     private String ticketCode;
     private int creatorUserId;
     private String ticketSubject;
     private String ticketContent;
     private Date ticketCreateDate;
     private int ticketCreateBy;
     private Date ticketTargetDate;
     private Integer contRiskSeverityId;
     private Integer contRiskProbId;
     private String ticketRemarkDesc;
     private Date ticketCloseDate;
     private Date ticketRespondDate;
     private Set<RskRiskControl> rskRiskControls = new HashSet(0);
     private Set<RskRiskCause> rskRiskCauses = new HashSet(0);
     private Set<TckTicketComment> tckTicketComments = new HashSet(0);
     private Set<TckTicketLog> tckTicketLogs = new HashSet(0);

    public TckTicket() {
    }

	
    public TckTicket(RmsClient rmsClient, RskRiskProbability rskRiskProbability, RmsProduct rmsProduct, TckTicketSla tckTicketSla, TckTicketStatus tckTicketStatus, RskRiskSeverity rskRiskSeverity, TckTicketType tckTicketType, String ticketCode, int creatorUserId, String ticketSubject, String ticketContent, Date ticketCreateDate, int ticketCreateBy, Date ticketTargetDate) {
        this.rmsClient = rmsClient;
        this.rskRiskProbability = rskRiskProbability;
        this.rmsProduct = rmsProduct;
        this.tckTicketSla = tckTicketSla;
        this.tckTicketStatus = tckTicketStatus;
        this.rskRiskSeverity = rskRiskSeverity;
        this.tckTicketType = tckTicketType;
        this.ticketCode = ticketCode;
        this.creatorUserId = creatorUserId;
        this.ticketSubject = ticketSubject;
        this.ticketContent = ticketContent;
        this.ticketCreateDate = ticketCreateDate;
        this.ticketCreateBy = ticketCreateBy;
        this.ticketTargetDate = ticketTargetDate;
    }
    public TckTicket(RmsClient rmsClient, RskRiskProbability rskRiskProbability, RmsProduct rmsProduct, TckTicketSla tckTicketSla, TckTicketStatus tckTicketStatus, RskRiskSeverity rskRiskSeverity, TckTicketType tckTicketType, String ticketCode, int creatorUserId, String ticketSubject, String ticketContent, Date ticketCreateDate, int ticketCreateBy, Date ticketTargetDate, Integer contRiskSeverityId, Integer contRiskProbId, String ticketRemarkDesc, Date ticketCloseDate, Date ticketRespondDate, Set rskRiskControls, Set rskRiskCauses, Set tckTicketComments, Set tckTicketLogs) {
       this.rmsClient = rmsClient;
       this.rskRiskProbability = rskRiskProbability;
       this.rmsProduct = rmsProduct;
       this.tckTicketSla = tckTicketSla;
       this.tckTicketStatus = tckTicketStatus;
       this.rskRiskSeverity = rskRiskSeverity;
       this.tckTicketType = tckTicketType;
       this.ticketCode = ticketCode;
       this.creatorUserId = creatorUserId;
       this.ticketSubject = ticketSubject;
       this.ticketContent = ticketContent;
       this.ticketCreateDate = ticketCreateDate;
       this.ticketCreateBy = ticketCreateBy;
       this.ticketTargetDate = ticketTargetDate;
       this.contRiskSeverityId = contRiskSeverityId;
       this.contRiskProbId = contRiskProbId;
       this.ticketRemarkDesc = ticketRemarkDesc;
       this.ticketCloseDate = ticketCloseDate;
       this.ticketRespondDate = ticketRespondDate;
       this.rskRiskControls = rskRiskControls;
       this.rskRiskCauses = rskRiskCauses;
       this.tckTicketComments = tckTicketComments;
       this.tckTicketLogs = tckTicketLogs;
    }
   
     @Id @GeneratedValue(strategy=IDENTITY)
    
    @Column(name="TICKET_ID", unique=true, nullable=false)
    public Integer getTicketId() {
        return this.ticketId;
    }
    
    public void setTicketId(Integer ticketId) {
        this.ticketId = ticketId;
    }
@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="CLIENT_ID", nullable=false)
    public RmsClient getRmsClient() {
        return this.rmsClient;
    }
    
    public void setRmsClient(RmsClient rmsClient) {
        this.rmsClient = rmsClient;
    }
@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="RISK_PROB_ID", nullable=false)
    public RskRiskProbability getRskRiskProbability() {
        return this.rskRiskProbability;
    }
    
    public void setRskRiskProbability(RskRiskProbability rskRiskProbability) {
        this.rskRiskProbability = rskRiskProbability;
    }
@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="PRODUCT_ID", nullable=false)
    public RmsProduct getRmsProduct() {
        return this.rmsProduct;
    }
    
    public void setRmsProduct(RmsProduct rmsProduct) {
        this.rmsProduct = rmsProduct;
    }
@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="TICKET_SLA_ID", nullable=false)
    public TckTicketSla getTckTicketSla() {
        return this.tckTicketSla;
    }
    
    public void setTckTicketSla(TckTicketSla tckTicketSla) {
        this.tckTicketSla = tckTicketSla;
    }
@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="TICKET_STATUS_ID", nullable=false)
    public TckTicketStatus getTckTicketStatus() {
        return this.tckTicketStatus;
    }
    
    public void setTckTicketStatus(TckTicketStatus tckTicketStatus) {
        this.tckTicketStatus = tckTicketStatus;
    }
@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="RISK_SEVERITY_ID", nullable=false)
    public RskRiskSeverity getRskRiskSeverity() {
        return this.rskRiskSeverity;
    }
    
    public void setRskRiskSeverity(RskRiskSeverity rskRiskSeverity) {
        this.rskRiskSeverity = rskRiskSeverity;
    }
@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="TICKET_TYPE_ID", nullable=false)
    public TckTicketType getTckTicketType() {
        return this.tckTicketType;
    }
    
    public void setTckTicketType(TckTicketType tckTicketType) {
        this.tckTicketType = tckTicketType;
    }
    
    @Column(name="TICKET_CODE", nullable=false, length=50)
    public String getTicketCode() {
        return this.ticketCode;
    }
    
    public void setTicketCode(String ticketCode) {
        this.ticketCode = ticketCode;
    }
    
    @Column(name="CREATOR_USER_ID", nullable=false)
    public int getCreatorUserId() {
        return this.creatorUserId;
    }
    
    public void setCreatorUserId(int creatorUserId) {
        this.creatorUserId = creatorUserId;
    }
    
    @Column(name="TICKET_SUBJECT", nullable=false, length=50)
    public String getTicketSubject() {
        return this.ticketSubject;
    }
    
    public void setTicketSubject(String ticketSubject) {
        this.ticketSubject = ticketSubject;
    }
    
    @Column(name="TICKET_CONTENT", nullable=false, length=65535)
    public String getTicketContent() {
        return this.ticketContent;
    }
    
    public void setTicketContent(String ticketContent) {
        this.ticketContent = ticketContent;
    }
    @Temporal(TemporalType.TIMESTAMP)
    @Column(name="TICKET_CREATE_DATE", nullable=false, length=19)
    public Date getTicketCreateDate() {
        return this.ticketCreateDate;
    }
    
    public void setTicketCreateDate(Date ticketCreateDate) {
        this.ticketCreateDate = ticketCreateDate;
    }
    
    @Column(name="TICKET_CREATE_BY", nullable=false)
    public int getTicketCreateBy() {
        return this.ticketCreateBy;
    }
    
    public void setTicketCreateBy(int ticketCreateBy) {
        this.ticketCreateBy = ticketCreateBy;
    }
    @Temporal(TemporalType.TIMESTAMP)
    @Column(name="TICKET_TARGET_DATE", nullable=false, length=19)
    public Date getTicketTargetDate() {
        return this.ticketTargetDate;
    }
    
    public void setTicketTargetDate(Date ticketTargetDate) {
        this.ticketTargetDate = ticketTargetDate;
    }
    
    @Column(name="CONT_RISK_SEVERITY_ID")
    public Integer getContRiskSeverityId() {
        return this.contRiskSeverityId;
    }
    
    public void setContRiskSeverityId(Integer contRiskSeverityId) {
        this.contRiskSeverityId = contRiskSeverityId;
    }
    
    @Column(name="CONT_RISK_PROB_ID")
    public Integer getContRiskProbId() {
        return this.contRiskProbId;
    }
    
    public void setContRiskProbId(Integer contRiskProbId) {
        this.contRiskProbId = contRiskProbId;
    }
    
    @Column(name="TICKET_REMARK_DESC", length=65535)
    public String getTicketRemarkDesc() {
        return this.ticketRemarkDesc;
    }
    
    public void setTicketRemarkDesc(String ticketRemarkDesc) {
        this.ticketRemarkDesc = ticketRemarkDesc;
    }
    @Temporal(TemporalType.TIMESTAMP)
    @Column(name="TICKET_CLOSE_DATE", length=19)
    public Date getTicketCloseDate() {
        return this.ticketCloseDate;
    }
    
    public void setTicketCloseDate(Date ticketCloseDate) {
        this.ticketCloseDate = ticketCloseDate;
    }

    @Temporal(TemporalType.TIMESTAMP)
    @Column(name="TICKET_RESPOND_DATE", length=19)
    public Date getTicketRespondDate() {
        return this.ticketRespondDate;
    }
    
    public void setTicketRespondDate(Date ticketRespondDate) {
        this.ticketRespondDate = ticketRespondDate;
    }
    
    @OneToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY, mappedBy="tckTicket")
    public Set<RskRiskControl> getRskRiskControls() {
        return this.rskRiskControls;
    }
    
    public void setRskRiskControls(Set<RskRiskControl> rskRiskControls) {
        this.rskRiskControls = rskRiskControls;
    }
    
    @OneToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY, mappedBy="tckTicket")
    public Set<RskRiskCause> getRskRiskCauses() {
        return this.rskRiskCauses;
    }
    
    public void setRskRiskCauses(Set<RskRiskCause> rskRiskCauses) {
        this.rskRiskCauses = rskRiskCauses;
    }

    @OneToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY, mappedBy="tckTicket")
    public Set<TckTicketComment> getTckTicketComments() {
        return this.tckTicketComments;
    }
    
    public void setTckTicketComments(Set<TckTicketComment> tckTicketComments) {
        this.tckTicketComments = tckTicketComments;
    }
@OneToMany(cascade=CascadeType.ALL, fetch=FetchType.LAZY, mappedBy="tckTicket")
    public Set<TckTicketLog> getTckTicketLogs() {
        return this.tckTicketLogs;
    }
    
    public void setTckTicketLogs(Set<TckTicketLog> tckTicketLogs) {
        this.tckTicketLogs = tckTicketLogs;
    }




}


